# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>

pkgname=python2-scandir
pkgver=1.10.0
pkgrel=1
pkgdesc="A better directory iterator and faster os.walk()"
arch=('i686' 'x86_64')
url="https://github.com/benhoyt/scandir"
license=('BSD')
depends=('python2')
makedepends=('python2-setuptools')
source=("$pkgname-$pkgver.tar.gz::https://github.com/benhoyt/scandir/archive/v$pkgver.tar.gz")
sha512sums=('1641ee5060331fe35a5f97c26a14423cf94fe462cdf875746e29ce095d00b9fc34291efd50ee67f1613d19312a8ed737f29a5092a38afdb1dc817fadc52a508f')

build() {
  cd scandir-$pkgver
  python2 setup.py build
}

check() {
  cd scandir-$pkgver
  LC_CTYPE=en_US.UTF-8 python2 test/run_tests.py || warning "Tests failed"
}

package() {
  cd scandir-$pkgver
  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -D -m644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
}

# vim:set ts=2 sw=2 et:
